#!/usr/bin/env node

const http = require('http'),
      log = console.log;

console.log("PID:",process.pid);
http.createServer((req,res)=>{
  log(`${req.method}${req.url} HTTP/${req.httpVersion}`);
  log(req.headers);
  log();
  req.pipe(process.stdout);
  res.end("hello world!");
}).listen(8080);
